package com.graduation.system.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 功能：公告实体类 
 * 对应数据库表：SYS_NOTICE
 * 作者：吴泽磊
 * 时间：2016/11/15
 */

@Entity
@Table(name = "SYS_NOTICE")
@DynamicInsert(true)
@DynamicUpdate(true)
public class SysNotice implements Serializable{

	private static final long serialVersionUID = -209336487847239957L;

	private Integer noticeID;//公告ID
	private String noticeTitle;//公告标题
	private String noticeContent; // 公告内容
	private String noticeSchool;//公告学校ID
	
	@Id
	@Column(name = "NOTICE_ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO) // 自增长
	public Integer getNoticeID() {
		return noticeID;
	}
	public void setNoticeID(Integer noticeID) {
		this.noticeID = noticeID;
	}
	@NotEmpty
	@Column(name = "NOTICE_TITLE", nullable = false)
	public String getNoticeTitle() {
		return noticeTitle;
	}
	public void setNoticeTitle(String noticeTitle) {
		this.noticeTitle = noticeTitle;
	}
	@NotEmpty
	@Column(name = "NOTICE_CONTENT", nullable = false)
	public String getNoticeContent() {
		return noticeContent;
	}
	public void setNoticeContent(String noticeContent) {
		this.noticeContent = noticeContent;
	}
	@NotEmpty
	@Column(name = "NOTICE_SCHOOL", nullable = false)
	public String getNoticeSchool() {
		return noticeSchool;
	}
	public void setNoticeSchool(String noticeSchool) {
		this.noticeSchool = noticeSchool;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
	
}
